import React, { Component } from 'react';
import { NavLink } from 'react-router-dom'


class Tabbar extends Component {
    constructor(props){
        super(props);
        this.state = {
            buttonList:[
                {
                    "id":"0",
                    "text":"在线商机",
                    "icon":"iconfont icon-wenben",
                    "link":"/commercialsson"
                  },
                  {
                    "id":"1",
                    "text":"黄豆纳才",
                    "icon":"iconfont icon-gongwenbao_",
                    "link":"/abilitysson"
                  },
                  {
                    "id":"2",
                    "text":"企业版",
                    "icon":"iconfont icon-qiye",
                    "link":"/enterprisesson"
                  },
                  {
                    "id":"3",
                    "text":"消息",
                    "icon":"iconfont icon-xiaoxi",
                    "link":"/informationsson"
                  },
                  {
                    "id":"4",
                    "text":"我的",
                    "icon":"iconfont icon-wode",
                    "link":"/minesson"
                  }
            ],
            
            i:0, 
        }
    }



    render() {
        return (
            <div className="tabbar">
                
                     {
                    this.state.buttonList.map((item,index)=>{
                        return (
                            <NavLink className={item.icon} key={index} to={ item.link }> {item.text} </NavLink>
                            
                            
                        )
                    })
                }
            </div>
        );
    }
}

export default Tabbar;

